package lab02.test27;

import java.util.InputMismatchException;
import java.util.Scanner;

public class  Test_27 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);


            System.out.println("请输入一个整数：");


            try {
                int a = sc.nextInt();
                System.out.println("a=" + a);


            } catch (InputMismatchException e) {

                System.out.println("你输入的不是整数！");
                e.printStackTrace();  //输出异常信息

            }

    }

}
